﻿using System.Diagnostics;
using System.IO;
using Ro.Common.RoArgs;

namespace Ro.Common.RoInterface
{
    /// <summary>
    /// 写入HTML的log状态
    /// 输出至控制台、Extent Rpeort
    /// 使用本状态
    /// 删除Error状态
    /// </summary>
    public enum RoLogStatus
    {
        /// <summary>
        /// 步骤成功，仅限测试步骤使用
        /// </summary>
        Pass,

        /// <summary>
        /// 步骤失败，仅限测试步骤使用
        /// </summary>
        Fail,

        /// <summary>
        /// 异常,说明测试遭遇了异常情况，无法正常继续进行测试
        /// <para>谨慎使用</para>
        /// </summary>     
        Fatal,

        /// <summary>
        /// 步骤异常，仅限测试步骤使用
        /// </summary>     
        Warning,

        /// <summary>
        /// 步骤信息，主要是输出一些提示性信息
        /// </summary>    
        Info,

        /// <summary>
        /// 步骤异常，仅限测试步骤需要Debug
        /// </summary>    
        Debug
    }


   
    /// <summary>
    /// Web测试步骤枚举
    /// 只读类型
    /// </summary>
    public static class RoWebStep
    {
        public const string WebLaunchFirefox = "web:Launch.Firefox";

        public const string WebLaunchChrome = "web:Launch.Chrome";

        public const string WebLaunchInternetExplorer = "web:Launch.InternetExplorer";

        public const string WebAlertAccept = "web:Alert.Accept";

        public const string WebAlertDismiss = "web:Alert.Dismiss";

        public const string WebAlertSendKeys = "web:Alert.SendKeys";

        public const string WebBrowserBack = "web:Browser.Back";

        public const string WebBrowserClose = "web:Browser.Close";

        public const string WebBrowserCloseTab = "web:Browser.CloseTab";

        public const string WebBrowserExecuteScript = "web:Browser.ExecuteScript";

        public const string WebBrowserForward = "web:Browser.Forward";

        public const string WebBrowserGoToUrl = "web:Browser.GoToUrl";

        public const string WebBrowserRefresh = "web:Browser.Refresh";

        public const string WebBrowserStop = "web:Browser.Stop";

        public const string WebBrowserSwitchFrame = "web:Browser.SwitchFrame";

        public const string WebBrowserSwitchToTab = "web:Browser.SwitchToTab";

        public const string WebBrowserTakeSnapshot = "web:Browser.TakeSnapshot";

        public const string WebMouseMove = "web:Mouse.Move";
        public const string WebMouseClick = "web:Mouse.Click";

        public const string WebRoWebElementClear = "web:RoWebElement.Clear";

        public const string WebRoWebElementClick = "web:RoWebElement.Click";

        public const string WebRoWebElementFocus = "web:RoWebElement.Focus";

        public const string WebRoWebElementSelect = "web:RoWebElement.Select";

        public const string WebRoWebElementSendKeys = "web:RoWebElement.SendKeys";

        public const string WebScrollDown = "web:Scroll.Down";

        public const string WebScrollUp = "web:Scroll.Up";

        public const string WebSleep = "web:Sleep";

        public const string WebUpdateSelect = "web:Update.Select";

        public const string WebWaitUntilPageIsLoaded = "web:WaitUntil.PageIsLoaded";

        public const string WebWaitUntilAreEqual = "web:WaitUntil.AreEqual";

        public const string WebWaitUntilAreNotEqual = "web:WaitUntil.AreNotEqual";

        public const string WebWaitUntilIsFalse = "web:WaitUntil.IsFalse";

        public const string WebWaitUntilIsTrue = "web:WaitUntil.IsTrue";

        public const string WebWaitUntilStringContains = "web:WaitUntil.StringContains";

        public const string WebWaitUntilStringLength = "web:WaitUntil.StringLength";
    }

    /// <summary>
    /// 对外输出语句枚举
    /// </summary>
    public static class OutConsoleEnum
    {
        public const string UnUseControl = "操作未使用页面控件";
        public const string UnExtraInfo = "没有额外附加信息";

        public const string AlertException = "操作Alert时，遭遇系统异常";
        public const string BrowserException = "操作Borwser时，遭遇系统异常";
        public const string LaunchException = "操作Launch时，遭遇系统异常";
        public const string MouseException = "操作Mouse时，遭遇系统异常";
        public const string RoWebElementException = "操作RoWebElement时，遭遇系统异常";
        public const string ScrollException = "操作Scroll时，遭遇系统异常";
        public const string SleepException = "操作Sleep时，遭遇系统异常";
        public const string UpdateException = "操作Update时，遭遇系统异常";
        public const string WaitUntilException = "操作WaitUntil时，遭遇系统异常";




    }


    
}
